<template>
	<div>
		<header class="navigation">
			<div @click="retreat"><img src="../assets/rightbut.png"></div>
			<div>系统消息</div>
			<div></div>
		</header>
		
		<div class="newscontent">
			<div>{{newsc.name}}</div>
			<div>{{newsc.createTime}}</div>
			<div>{{newsc.content}}</div>
		</div>
		
	</div>
</template>

<script>
	import { BaseUrl } from '../Baseurl/common.js';
	import { Toast } from 'mint-ui';
	export default {
		data(){
			return{
				id:'',
				newsc:[],
			}
		},
		created(){
			this.id =  this.$route.query.id;
			var url = BaseUrl + 'msg/info?msgId=' + this.id;
			this.$http.post(url).then(res=>{
//				console.log(res.data.data)
				if(res.data.code == '10000'){
					this.newsc = res.data.data;
				}else{
					Toast({
						message: res.data.msg,
						position: 'middle',
						duration: 3000
					})
				}
			}).catch(res=>{
				Toast({
					message: "网络异常",
					position: 'middle',
					duration: 3000
				})
			})
		},
		methods:{
			//导航退后
			retreat:function(){
				window.history.go(-1);
			},
		}
	}
</script>

<style scoped="scoped">
	.navigation{
		height: 1rem;
		background: #fff;
		display: flex;
		align-items: center;
		justify-content: space-between;
		border-bottom: 0.1px solid #E3E3E3;
		padding: 0 0.25rem;
		color: #323232;
		font-size: 0.36rem;
	}
	
	.navigation img{
		width: 0.2rem;
		height: 0.36rem;
		display: block;
	}
	.newscontent{
		padding: 0.2rem 0.25rem 0 0.25rem;
	}
	.newscontent div:nth-child(1){
		font-size: 0.35rem;
		color: #323232;
	}
	.newscontent div:nth-child(2){
		font-size: 0.2rem;
		color: #989898;
		margin-bottom: 0.3rem;
	}
	.newscontent div:nth-child(3){
		font-size: 0.3rem;
		color: #323232;
	}
	.newscontent div:nth-child(4){
		font-size: 0.3rem;
		color: #323232;
	}
</style>